Microcontroller interface with hall element

ABSTRACT

A device controller system incorporates an inexpensive Hall element to detect motion of a brushless DC motor. A magnet, which is part of a motor rotor, passes by the Hall element producing a Hall voltage each rotation. The Hall voltage is coupled through an interface port to a comparator within a process controller. A microprocessor within the process controller calculates a control response based on a comparator output signal. The interface port is rapidly configured to provide signals produced from the control response as output to device drivers on the same input-output pins that receive the Hall voltage. The device drivers produce a current through fan coils producing an update in the magnetic field of each motor phase which updates the speed of the fan according to programming within the process controller. Rapid configuring and reconfiguring of the interface port allows all necessary components of the controller system to be used with a single rotational commutation cycle.

RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.11/468,614, filed on Aug. 30, 2006 now U.S. Pat. No. 7,420,349, which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

The present invention relates to interfacing a controller to a Hallelement and device drivers. More specifically, a microcontroller andcomparator are interfaced to a Hall effect sensor to measure a Hallvoltage and to produce signals to a device driver over the sameinterface port pins.

BACKGROUND ART

There is continual need to improve response time and resolution incontrolling the movement of devices where a controller and feedback loopare incorporated. In these situations, controllers are interfaced withdevices and combinations of sensors and device drivers to compose anoverall feedback loop. A controller initiates a certain action on adevice through the driver circuit, a sensor circuit acquires informationregarding how the device has responded to the drive input, and amodified new drive input is calculated. This type of control loop iswidely pursued in brushless DC motor (BLDC) commutation and in systemsincorporating fans being driven by these motors.

Hall effect sensors are part of a technology application incorporating amagnet on the device being controlled. The Hall effect sensor is used todetect the proximity of a magnetic field coming from the magnet andtherefore providing information about a location and movement of thedevice the magnet is attached to. For example, controlling the speed ofa fan connected as part of a DC brushless motor is highly desirable.Maintaining a speed relative to a temperature sensed in the fan'senvironment and adjusting the speed for maintaining a constanttemperature is a technique frequently used.

With reference to FIG. 1, a type of Hall effect sensor, known as a Halldevice 125, is powered by connections to a supply voltage V_(DD) 110 andground 112 within a device controller system 100. The Hall device 125incorporates additional devices and circuitry beyond an elemental Hallsensor to provide current and voltage sensing capability in a singlecomponent. A controller 105 is connected to power between supply voltageV_(DD) 110 and ground 112. The controller 105 conducts the generalprocesses of the system. The Hall device 125 has a Hall device outputpin 150 connecting to a controller input pin 135.

Each of two output pins 140 a and 140 b of the controller 105 connectsto a control input of a device driver 120 a and 120 b. Each of twodevice drivers 120 a and 120 b contains a drive resistor 122 a and 122 band a drive transistor 124 a and 124 b. Each of two drive resistors 122a and 122 b connects between an input of a device driver 120 a and 120 band a base terminal of the corresponding drive transistor 124 a and 124b. Each emitter terminal of the drive transistors 124 a and 124 bconnects to ground 112. Each of two fan coils 130 a and 130 b connectsbetween a fan power supply 115 and a collector terminal of a respectivedrive transistor 124 a and 124 b. Each fan coil 130 a and 130 b relatesto one phase of a brushless DC (BLDC) motor (not shown).

The brushless DC motor has magnetic poles associated with a rotor (notshown). During rotation, the magnetic poles of the rotor pass by theHall device 125, each creating a Hall voltage pulse on the Hall deviceoutput pin 150. For a two-phase motor, two pulses will be produced onthe Hall device output pin 150 for each rotation of the motor. The Hallvoltage pulse is used as input to the controller 105 as part of acommutation scheme for the motor. During the first portion of thebrushless DC motor commutation cycle, the Hall voltage pulse is coupledto the controller 105 through the controller input pin 135. The Hallvoltage pulse switches between 0 V (volts) and V_(DD) 110 in response tovariations of the associated fields from the magnetic rotor poles. Thetoggling of the Hall voltage pulse is used in combination withprogramming within the controller 105 as part of the commutation schemeto control the speed of the fan.

The combination scheme uses a change in the Hall voltage pulse totrigger an interrupt programming routine operating within the controller105. The interrupt routine interrogates a timer that has been countingup since a last change in the Hall voltage pulse. According to how muchtime has elapsed since the last change in Hall voltage pulse, and takinginto account the rising or falling transition of the present change inthe Hall voltage pulse, the controller 105 will produce fan coil controlsignals at the port pins 140 a and 140 b. The fan coil control signalsare coupled to the device drivers 120 a and 120 b where they produce abase voltage at the base terminal of the driver transistors 124 a and124 a. Changes in the base voltage on the driver transistors 124 a and124 b vary the amount of current conducted through the fan coils 130 aand 130 b. The varying current, in turn, modulates the magnetic field inthe coils controlling the respective phases of the brushless DC motor.By varying the timing and duration of the fan coil control signals, thecontroller 105 will maintain or change the fan speed according torequirements of the programming.

Presently, the use of a Hall device 125 means that in addition to anelemental Hall sensor, devices and circuitry are incorporated in thedevice to provide current and voltage sensing capability in a singlecomponent. The additional circuitry causes the Hall device 125 to costsignificantly more than the elemental Hall sensor. Additionally, thecontroller 105 contains additional components and circuitry capable ofmeasuring signals and voltages. Presently, not all of the measuringcomponents in the device controller system 100 are incorporated in themeasurement process. A typical device controller system 100, therefore,may contain components with costly additional measurement circuitry,while at the same time, the system may have measurement componentsavailable that are going unused. It would be desirable for a devicecontroller system 100 to be able to use a less expensive Hall sensor andat the same time incorporate any components already available within thesystem to measure the Hall voltages produced and provide a morecost-effective commutation scheme.

SUMMARY

A device controller system incorporates a Hall element to determine aposition or orientation of a magnet on a moving device being controlled.A typical device being controlled is a brushless DC motor. The systemcontains a process controller that can be coupled through an interfaceport to receive a Hall voltage from the Hall element. Unlike the priorart, a comparator within the process controller receives the Hallvoltage for measurement. The Hall voltage is received on the sameprocess controller port pins as those used to provide output controlsignals to drive a device. This saves one process controller port pinthat was formerly dedicated as a Hall device input pin. The comparatoroutput signal is available to direct either software program flow orinterrupt select logic in a microprocessor.

Based on the comparator output signal, a control response is calculatedby the microprocessor. The control response is a set of signals that areapplied to device drivers for driving fan motor coils. A most recentcontrol response produces current in the motor coils to maintain orchange the motor speed based on the programming being executed by theprocess controller. The Hall element senses the ensuing motion of thedevice (from movement of a magnetic field past the sensor) and theresulting Hall voltage is able to trigger the process again.

The process controller configures an interface port to receive the Hallvoltage from the Hall element in a first portion of a fan commutationcycle. The comparator is coupled to the Hall element for measurement ofthe Hall voltage. The processor calculates the control response and theinterface port is reconfigured to allow control response signals to bepropagated to device drivers. In a second portion of the fan commutationcycle, the device driver transistors produce a current through the fancoils. Configuring of the interface port to either receive or sendsignals to various system elements allows the device control process tobe completed with the elements already available in the processcontroller. Effective use of available system elements, such as thecomparator and analog-to-digital converter, a reduction of other systemelements, such as a dedicated Hall device pin, along with an ability toincorporate a low cost Hall element, provide an economical devicecontroller system.

The present invention is also a method of controlling a device where aHall effect sensor is coupled to an interface port. A Hall voltage isproduced on the Hall effect sensor by movement of a magnetic fieldassociated with the device. A comparator is coupled to the interfaceport for receiving and measuring the Hall voltage. A control response iscalculated according to the output of the comparator measurement.Control response signals are coupled to the device drivers to control adevice incorporating a magnet.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a prior art device controller systemfor an electric motor, or the like, incorporating a Hall device andcontroller.

FIG. 2 is a schematic diagram of an exemplary embodiment of the presentinvention incorporating a Hall element and process controller to controlan electric motor, or the like.

FIG. 3 is a logic block diagram of an exemplary embodiment of aconfigurable interface port for interface port pins in the processcontroller of FIG. 2.

FIG. 4 is a process flow diagram of an exemplary embodiment of thepresent invention incorporating a Hall effect sensor configured tocontrol a device including a magnet for position indication.

FIG. 5 is a process flow diagram of an exemplary embodiment of thepresent invention incorporating a Hall element coupled with a comparatorto vary a pulse width modulation signal in controlling a device.

DETAILED DESCRIPTION

With reference to FIG. 2, a Hall effect sensor, instantiated as a Hallelement 225 in the present exemplary embodiment, is powered byconnections to V_(DD) 210 and ground in a device controller system 200.The Hall element 225 is less expensive than the Hall device 125 (FIG.1). The Hall device 125 incorporates additional devices and circuitry toprovide current and voltage sensing capability in a single componentthat the Hall element 225 does not. The Hall element 225 provides Hallelement output pins 250 a and 250 b for electrical connection. The Hallelement output pins 250 a and 250 b connect to Hall element resistors255 a and 255 b. The Hall element resistors 255 a and 255 b provide acurrent limiting capability between the Hall element output pins 250 aand 250 b and interface port pins 240 a and 240 b of a processcontroller 205 while providing a two-phase output signal on the twopins. Values for the Hall element resistors 255 a,b may be selectedfrom, for example, 470 ohms to 2 kilo ohms (k ohms). The Hall elementresistors 255 a,b limit a magnitude of current entering into the Hallelement output pins 250 a,b from reaching undesirable levels. When theinterface port pins 240 a,b are at a high logic level, (i.e., a logiclevel 1), an output voltage level may be, for example, from 2.0 to 5.0volts. Without the Hall element resistors 255 a,b limiting a resultingcurrent, damage to the Hall element 225 would occur.

The process controller 205 contains a microprocessor (not shown) toexecute instructions, calculate a control response, and configureconnections between the interface port pins 240 a and 250 b and otherelements of the device controller system 200. The microprocessor is alsocommonly known as a microcontroller. The process controller 205 isconnected to power between V_(DD) 210 and ground.

Each interface port pin 240 a and 240 b connects to a control input of adevice driver 220 a and 220 b. Each device driver 220 a and 220 bcontains a drive resistor 222 a and 222 b and a drive transistor 224 aand 224 b. Each drive resistor 222 a and 222 b connects between an inputof the device driver 220 a and 220 b and a base terminal of thecorresponding drive transistor 224 a and 224 b for handling thedifferent output phases. Selected values for the drive resistors 222 a,bmay range, for example, from 1 k to 10 k ohms. Each emitter terminal ofthe drive transistors 224 a and 224 b connects to ground. Each fan coil230 a and 230 b connects between a fan power supply 215 and a collectorterminal of the respective drive transistor 224 a and 224 b. Each fancoil 230 a and 230 b relates to one phase of a brushless DC (BLDC) motor(not shown).

The brushless DC motor has magnetic poles associated with a rotor (notshown). During rotation, the magnetic poles of the rotor pass by theHall element 225 creating a Hall voltage across the Hall element outputpins 250 a and 250 b. The microprocessor configures the interface portpins 240 a and 240 b to receive input signals during a first portion ofa commutation cycle of the brushless DC motor. The interface port pins240 a and 240 b are further configured to connect input signals to acomparator (explained infra). During the first portion of the brushlessDC motor commutation cycle, the Hall voltage is coupled to thecomparator through the configured interface port pins 240 a and 240 b.In this way the comparator is able to measure the Hall voltage andproduce a comparison signal output (not shown). The comparison outputsignal is available to other system elements and to the microprocessor.

The process controller 205 contains a microprocessor (not shown) thatcarries out execution of program code for the process controller 205. Areference to the process controller 205 carrying out a process step orproducing certain signals is synonymous to the microprocessor producingthe same action either by itself or in combination with other elementswithin the process controller 205. The microprocessor is programmed tocalculate a control response corresponding to the comparison signal. Thecontrol response is a set of signals produced by the microprocessor thatare used to control device drivers of the brushless DC motor (explainedinfra). The control response may be carried out as a result of themicroprocessor configuring the interface port pins 240 a and 240 b foreither an input or an output communication (i.e., a bidirectionalinterface for bidirectional communication) in combination withconfiguring a coupling of the interface port to additional measuringelements within the process controller 205.

A microprocessor and related system elements constitute a processcontroller. A process controller is a microprocessor plus additionalelements required or capable of producing results necessary to perform aparticular process. Additional elements may be, for example, an A-to-Dconverter, an analog comparator, coder-decoder (CODEC), or universalasynchronous receiver transmitter (UART). A microprocessor plus acollection of such additional system elements within a single package orsystem is a process controller. For example, an Atmel® ATtinyl13 8-bitAVR® microcontroller is a process controller where the microcontrolleris accompanied by a timer/counter with prescaler, an Analog-to-Digitalconverter, an internal voltage reference, a watchdog timer, anoscillator, and an analog comparator with in a plurality of possiblesingle package options. Depending on the level and timing of the Hallvoltage, adjustments in the control response are made to produce a fanspeed according to programming directives. The programming of themicroprocessor may be configured to maintain, for example, constantspeed or provide constant power to the motor.

In a second portion of a commutation cycle of the brushless DC motor,the microprocessor configures the interface port pins 240 a and 240 b tosend output signals (not shown). Each of the output signals areconnected through interface port pin 240 a and 240 b to a device driver220 a and 220 b. Within each device driver 220 a and 220 b a signalcorresponding to the control response is propagated through the driveresistor 222 a and 222 b and applied to the corresponding base terminalof the respective drive transistor 224 a and 224 b. According to thecontrol response programming of each motor phase, conduction of currentthrough the drive transistor 224 a and 224 b is increased or decreasedto produce more or less of a magnetic field within the fan coil 230 aand 230 b. The speed of rotation of the brushless DC motor is increasedor decreased according to the increase of decrease of current (andmagnetic field) in the pair of fan coils 230 a and 230 b. The resultingspeed of the brushless DC motor is reflected in the speed that themagnetic poles of the rotor pass by the Hall element 225. In this way, afeedback loop is completed and the process of controlling the brushlessDC motor continues in a subsequent commutation cycle of the motor.

With reference to FIG. 3, interface port pins 240 a and 240 b, of theprocess controller 205 (FIG. 2), connect to port configuration blocks310 a and 310 b within the process controller 205. Port configurationlines 355 a and 355 b connect from a data bus 365 to the portconfiguration blocks 310 a and 310 b. A number, n, of port configurationlines 355 a and 355 b provide signals from the microprocessor (notshown), through the data bus 365, to set up the configuration block 310a and 310 b to send or receive signals. Further connections to the portconfiguration blocks 310 a and 310 b are output data lines 315 a and 315b and input data lines 317 a and 317 b. Input data lines 317 a and 317 bconnect to first inputs of corresponding multiplexers 325 a and 325 b.Outputs of auxiliary circuits or, auxiliary sources 320 a and 320 b,connect to second inputs of the corresponding multiplexers 325 a and 325b. Auxiliary sources 320 a and 320 b, when used, are capable ofcontaining, for example, a bandgap reference voltage source oradditional multiplexers to provide coupling to other input signals orvoltage sources (not shown). Multiplexer select lines 330 a and 330 bconnect from a configuration register 333 to related multiplexers 325 aand 325 b. The configuration register 333 connects to the data bus 365to receive configuration signals from the microprocessor.

An output from a first multiplexer 325 a connects to a positive input ofa comparator 335. An output from a second multiplexer 325 b connects toa negative input of the comparator 335. A comparator output 338 connectsto an interrupt selection logic block 345 and is input to a control andstatus register 340. A comparator interrupt output 348 also connectsfrom the interrupt selection logic block 345 to the control and statusregister 340. For example, a pair of interrupt mode select lines 343connects from the control and status register 340 to the interruptselection logic block 345. The pair of interrupt mode select lines 343provides signals that control that mode of comparator output signaltransition which trigger interrupts. For example, interrupts may beselected to be triggered by a rise, fall, or toggling of the signalproduced on the comparator output 338. Data in the control and statusregister 340, coming from the comparator 335 and the interrupt selectionlogic block 345, are available to the microprocessor over the data bus(not shown) for reading.

The output data lines 315 a and 315 b connect from a data register 316to the port configuration blocks 310 a and 310 b. The data register 316connects with the data bus 365 to receive signals from themicroprocessor for eventual propagation through the port configurationblocks 310 a and 310 b as output data.

During the first portion of the brushless DC motor commutation cycle, asmentioned supra, the microprocessor (not shown) produces portconfiguration signals through the data bus 365 and on to the portconfiguration lines 355 a and 355 b for configuring the portconfiguration blocks 310 a and 310 b. Each port configuration block 310a and 310 b is configured to couple an interface port pin 240 a and 240b to a first input of a multiplexer 325 a and 325 b through the inputdata lines 317 a and 317 b. The microprocessor produces configurationsignals on the data bus 365 that are provided to the configurationregister 333. Outputs from the configuration register 333 reproduce theconfiguration signals on the multiplexer select lines 330 a and 330 bthat select a path through the multiplexers 325 a and 325 b and couplethe signals on the set of first inputs of the multiplexers 325 a and 325b to the positive and negative inputs of the comparator 335.

With the interface port pins 240 a and 240 b configured to couple to thecomparator 335, the Hall voltage coming from the Hall element outputpins 250 a and 250 b (FIG. 2) is coupled to the comparator 335 formeasurement. The first portion of the brushless DC motor commutationcycle is configured by the microprocessor for obtaining and measuringthe Hall voltage. The microprocessor continues during this portion ofthe commutation cycle to calculate the control response.

The microprocessor is also capable of being programmed, for example, toselect an interrupt mode for the interrupt selection logic block 345.The microprocessor produces interrupt mode select signals on the databus 365 and propagates them (not shown) to the control and statusregister 340. The interrupt mode select lines 343 a and 343 b couple theinterrupt mode select signals from the control and status register 340to the interrupt select logic block 345. The interrupt mode selectsignals determine detection of a rising, falling, or toggling Hallvoltage.

During a second portion of the brushless DC motor commutation cycle, themicroprocessor produces signals through the data bus 365 and through theport configuration lines 355 a and 355 b. Signals received over the portconfiguration lines 355 a and 355 b configure the port configurationblocks 310 a and 310 b to couple the interface port pins 240 a and 240 bto the output data lines 315 a and 315 b. The set of signalsrepresenting the control response (explained supra) are routed throughthe data bus 365 and into the data register 316. The contents of thedata register 316 produce control response signals on the output datalines 315 a and 315 b which are routed through the port configurationblocks 310 a and 310 b to the interface port pins 240 a and 240 b.

In this way, signals representing the calculated control response comingfrom the microprocessor are propagated through the output data lines 315a and 315 b to the interface port pins 240 a and 240 b. Control responsesignals continue propagating through the device drivers 220 a and 220 band produce current in the fan coils 230 a and 230 b. The current in thefan coils 230 a and 230 b produce magnetic fields that rotate thebrushless DC motor. Although the Hall element 225 is not able todetermine a direction of rotation of the associated fan, themicroprocessor does command excitation of the fan coils 230 a,b based onsignals from the Hall element 225. A particular sequence of thesecommands under control of the microprocessor will result in eitherclockwise or counterclockwise rotation. According to programmingexecuted by the microprocessor, the control response may serve to speedup, maintain, or reduce the speed of the fan motor by adjusting currentin the fan coils 230 a and 230 b accordingly.

With reference to FIG. 4, an exemplary embodiment of a method forcontrolling a device according to the present invention commences withconfiguring 405 the interface port to receive signals. The methodcontinues with producing 410 a Hall voltage on a Hall effect sensor andmeasuring 415 the resulting Hall voltage. Next, a step of calculating420 a control response is taken followed by configuring 425 theinterface port to send signals. The method continues with producing 430control signals corresponding to the control response calculated supra.The method goes on with a step of changing 435 a device positionaccording to the control signals and changing 440 a magnetic fieldcorresponding to the change in position of the device. The methodcontinues with the step of measuring 415 the resulting Hall voltage andrepeating the process above in accordance with an overall device controlrequirement. A magnet attached to the device provides the magnetic fieldrepresenting changes in the device position.

With reference to FIG. 5, an exemplary embodiment of a method forcontrolling a device according to the present invention commences withinitializing 505 a controller followed by a further initializing 510 ofa pulse width modulation scheme and controller outputs. The methodcontinues with reading 515 analog control signals at a set of inputports and converting 520 analog signals to a digital representation. Themethod goes on with reading 525 a Hall voltage across a Hall elementwith a comparator. A next step is determining 530 an output level of thecomparator. In the case that the comparator output level is equal tozero, a next step is producing 535 a a pulse width modulated signal tothe phase 1 motor windings and returning to the step of reading 515analog control signals. In the case that the comparator output level isequal to one, a next step is producing 535 b a pulse width modulatedsignal to the phase 2 motor windings and returning to the step ofreading 515 analog control signals.

While examples have been presented of a microcontroller based interfacewith a Hall element, one skilled in the art would readily recognize thatmany different combinations of system elements and process steps may beincorporated to accomplish the same overall result of device control.For example, a microcontroller has been described as part of a processcontroller. One skilled in the art would recognize the equivalence ofvarious forms of processing capability. For example, the same programexecuting capabilities could be provided by an embedded RISCmicroprocessor or embedded controller (in combination with additionalsystem elements) that is able to accept interrupt requests and initiateor interrupt service routines (ISRs) in response.

Additionally, a Hall voltage measuring device has been demonstrated as acomparator. One skilled in the art would recognize that a differentialoperational amplifier, instrumental amplifier, analog-to-digitalconverter, or voltage level measuring device (comprised of bandgapbiased transistors and current mirrors) with references to anappropriate voltage level would accomplish the same result. While anexemplary embodiment of a two phased brushless DC motor controller hasbeen presented, one skilled in the art would readily conceive of acombination of multiple embodiments of the example presented supra whichwould be able to control a three phase motor for instance.

Furthermore, a brushless DC (BLDC) motor commutation scheme has beenexemplified. A similar interface port could be reconfigured to provideother measurement and drive capabilities. For instance, a currentmeasuring device related to a photo sensor could be coupled-to, througha configurable interface port, in a first portion of a systemcommutation cycle timeface. A magnitude of current measured by thesystem could correspond directly to a light intensity level received atthe photo sensor. In a second portion of the system commutation cycletimeframe, a pulse width modulated signal could be sent to an enginecontrolling throttle servo. In this way an aircraft propeller speedcould be sensed by the optical sensor and the speed of the enginerunning the propeller modified through servo control updates within eachcommutation cycle of the propeller.

1. A system, comprising: a microprocessor containing a bidirectionalinterface, wherein the microprocessor is programmed with code tomaintain a condition and drive a rotating device; a Hall effect sensorcoupled to the bidirectional interface; the rotating device coupled tothe bidirectional interface of the microcontroller; and an auxiliarycircuit multiplexed and coupled to the bidirectional input of themicrocontroller.
 2. The system of claim 1, wherein the code to maintaina condition translates a sensed voltage from the Hall effect sensor todetect changes in temperature.
 3. The system of claim 1, wherein thecode to maintain a condition translates the sensed voltage from the Halleffect sensor to detect changes in power consumption.
 4. The system ofclaim 1, wherein the code to maintain a condition is written to limitthe range of operation within a certain voltage value as detected by theHall effect sensor.
 5. The system of claim 1, wherein the auxiliarycircuit includes a bandgap reference.
 6. The system of claim 1, whereinthe auxiliary circuit is a second multiplex circuit.
 7. The system ofclaim 1, wherein the microprocessor includes an interrupt selectionblock.
 8. The system of claim 7, wherein the interrupt selection blockdetects a rising, falling or toggling Hall voltage.
 9. The system ofclaim 1, wherein the microprocessor includes a pulse width modulatorcoupled to the bidirectional interface.
 10. They system of claim 9,wherein the pulse width modulator is controlled by the Hall effectsensor.
 11. The system of claim 9, wherein the pulse width modulatordrives the rotating device.
 12. A method for reducing interconnectscomprising: using a microprocessor to control a hall effect sensor and arotating device; coupling both the hall effect sensor and the input ofthe rotating device to a bidirectional interface on a microcontroller,using the output of the hall effect sensors to control the rotatingdevice; programming the microprocessor with code that alternatescomparing sensed values from the hall effect sensor and driving therotating device.
 13. The method of claim 12, wherein using amicroprocessor comprises programming the microprocessor to disable usingthe output of the hall effect sensor to control the rotating device. 14.The method of claim 12, wherein comparing sensed values comprisesgenerating an interrupt signal.
 15. The method of claim 14, whereingenerating an interrupt signal includes detecting at least one ofrising, falling or toggling change in a sensed Hall voltage.
 16. Themethod of claim 12, wherein using a output of the Hall effect sensorcomprises setting a pulse width modulator based on the compared voltagesfrom the Hall effect sensor.